<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>商品详情</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<include file="public/comm" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav fs_xl">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left fs_xxi"></a>
		    <h1 class="mui-title fs_xl">商品详情</h1>
		</header>
		<div class="fs_xl mui-content ch_nav_t shop">
			<div class="one_info">
				<div class="swiper-container">
					<div class="swiper-wrapper">
						<foreach name="goods_images_list" item="vo" key="k">
							<div class="swiper-slide">
								<a href="#"><img src="{$vo.image_url}" /></a>
							</div>
						</foreach>
					</div>
					<div class="pagination"></div>
				</div>
			</div>
			<div class="shop_info">
				<p class="fs_l"><span class="dz_span fs_m">我要定制</span>{$goods.goods_name}</p>
				<p class="fs_xs"><i class="mui-icon iconfont icon-huangye_dianpumingcheng fs_xl"></i><em>{$goods.originname}原产</em></p>
				<p class="fs_m">
					<span class="span3 fs_xl">¥{$goods.shop_price}</span><span class="span4 fs_xxs">{$goods.sales_sum}单已售</span>
				    <if $goods.is_sample == 1><a href="" class="pcxy fs_s">品尝小样</a></if>
				</p>
				<if $goods.deduction_amount != 0>
				<p class="manjian fs_xs"><span>满减</span>每满<em>{$goods.shop_price}</em>元，可减<em>{$goods.deduction_amount}</em>元现金</p>	
				</if>
				<if $goods.give_integral != 0>
				<p class="zengsong fs_xs"><span>赠送</span>完成评价并晒单再赠送{$goods.give_integral}银酒币</p>	
				</if>
				<p>购买数量：
					<span class="mui-numbox" data-numbox-min='30' data-numbox-step='6'>
						<button id="btn2" class="mui-btn mui-btn-numbox-minus" type="button">-</button>
						<input id="box" class="mui-input-numbox" type="number" name="goods_num" value="1" />
						<button id="btn1" class="mui-btn mui-btn-numbox-plus" type="button">+</button>
					</span>
				</p>
			</div>
			<div class="shop_js">
				<div class="shop_xz_top fs_xl cls">
					<ul>
						<li class="active">图文详情</li>
						<li>商品参数</li>
						<li>评论</li>
					</ul>
				</div>
				<div class="shop_m_box">
					<div class="shop_js_m active">
						{$goods.goods_content|htmlspecialchars_decode}
					</div>
					<div class="shop_js_m canshu">
						<p>品牌<span>{$goods.brand_name}</span></p>
						<p>香型<span>{$goods.aromaname}</span></p>
						<p>主题<span>{$goods.themename}</span></p>
						<p>产地<span>{$goods.originname}</span></p>
						<p>厂名<span>{$goods.suppliers_name}</span></p>
						<p>厂址<span>{$goods.suppliers_address}</span></p>
						<p>生产许可证号<span>{$goods.licence_code}</span></p>
					</div>
					<div class="shop_js_m">
						<div class="one_pl">
            <ul>
							<volist name="comment_list" id="vo">
								<li>
									<div class="pl_tit">
										<span class="pl_tx"><img src="{$vo.head_pic}" /></span>
										<span class="pl_name fs_m">{$vo.username}</span>
										<span class="pl_time fs_xs">{$vo.add_time|date="y-m-d",###}</span>
									</div>
									<div class="pl_info">
										<p class="fs_xs">{$vo.content|htmlspecialchars_decode}</p>
										<p class="cls">
											<volist name="vo.img" id="voo">
												<span><img src="{$voo}" /></span>
											</volist>
										</p>
									</div>
								</li>
							</volist>
						</ul>
						<p style="text-align:center;padding-top:0.5em;"><a class="fs_s" href="{:U('Mobile/Goods/goods_comment',array('id'=>$vo.goods_id))}">查看更多评论</a></p>
		    		</div>
					</div>
				</div>				
			</div>
		</div>
		<a class="gwc_xf fs_xl" href="{:U('Cart/cart')}"><img src="__STATIC__/images/gwc021211.png" /></a>
		<div class="shop_gwc fs_xl">
			<a class="kf" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=526895676&site=qq&menu=yes">
				<p class="mui-icon iconfont icon-kefu fs_i"></p>
				<p class="fs_s">客服</p>
			</a>
			<a class="dp" href="{:U('mobile/Cellar/factoryInfo',array('id'=>$goods.suppliers_id))}">
				<p class="mui-icon iconfont icon-dianpu fs_i"></p>
				<p class="fs_s">店铺</p>
			</a>
			<a class="btn1 fs_m" href="{:U('mobile/Destine/goodsDestine',array('goods_id'=>$goods.goods_id))}">我要定制</a>
			<a class="btn2 fs_m" id="goumai">直接购买</a>
		</div>
		<script type="text/javascript">
			mui.init();
			$(".device,.swiper-container").height($(".swiper-slide img").height());
			$(".swiper-container1").height($(".swiper-slide").height());
			$(window).resize(function() {
				$(".device,.swiper-container").height($(".swiper-slide img").height());
				$(".swiper-container1").height($(".swiper-slide").height());
			});
			var mySwiper = new Swiper('.swiper-container', {
				pagination: '.pagination',
				loop: true,
				autoplay : 5000,
				grabCursor: true,
				autoplayDisableOnInteraction : false,
				paginationClickable: true
			});
			
			$(function(){
				$(".shop_xz_top li").click(function () {
	        		$(".shop_xz_top li").removeClass("active").eq($(".shop_xz_top li").index(this)).addClass("active");
	        		$(".shop_js_m").hide().eq($('.shop_xz_top li').index(this)).show();
    			});
				$("#goumai").click(function(){
        			var num = $("#box").val();
        			AjaxAddCart({$goods.goods_id},num,1);
        		})
			})
		</script>
	</body>

</html>